﻿@model MvcBoard.Models.Post

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.HiddenFor(m => m.postNo)
    @Html.HiddenFor(m => m.readCount)
    @Html.HiddenFor(m => m.writetime)

    <table class="tbl_basic">
        <tr>
            <th>이름</th>
            <td>@Html.TextBoxFor(m=>m.name)</td>
        </tr>
        <tr>
            <th>제목</th>
            <td>@Html.TextBoxFor(m=>m.subject)</td>
        </tr>
        <tr>
            <th>내용</th>
            <td>@Html.TextAreaFor(m => m.content, new { rows = 10 })</td>
        </tr>
    </table>
    <p><input type="submit" value="저장"</p>
}   


@*
    <fieldset>
        <legend>Post</legend>

        @Html.HiddenFor(model => model.postNo)

        <div class="editor-label">
            @Html.LabelFor(model => model.name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.name)
            @Html.ValidationMessageFor(model => model.name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.subject)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.subject)
            @Html.ValidationMessageFor(model => model.subject)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.content)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.content)
            @Html.ValidationMessageFor(model => model.content)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.writetime)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.writetime)
            @Html.ValidationMessageFor(model => model.writetime)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.readCount)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.readCount)
            @Html.ValidationMessageFor(model => model.readCount)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>*@


<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
